package interview;

public class interview_10_10 {
    class StreamRank {
        private int[] number;
        public StreamRank() {
            number=new int[50001];
        }

        public void track(int x) {
            number[x]+=1;
        }

        public int getRankOfNumber(int x) {
            int sum=0;
            for(int i=0;i<=x;++i){
                sum+=number[i];
            }
            return sum;
        }
    }
}
